By virtue of the office that originated it, or of the title held.
The President of the Republic of France is, ex officio, also prince of the dyarchy called Andorra.